/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.service;

import java.util.List;

import com.legendshop.dao.support.CriteriaQuery;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.model.Attachment;
import com.legendshop.oa.model.AttachmentTree;

/**
 *  附件Service.
 */
public interface AttachmentService  {

    public Attachment getAttachment(Long id);
    
    public void deleteAttachment(Attachment attachment);
    
    public void deleteAttachment(String  filePath);
    
    public Long saveAttachment(Attachment attachment);

    public void updateAttachment(Attachment attachment);

    public PageSupport<Attachment> getAttachment(CriteriaQuery cq);

	public Attachment getAttachmentByFilePath(String filePath);
	
	public Attachment getAttachmentByFilePath(String filePath,Long shopId);

	public void updateAttachmentStsByFilePath(String filePath, int sts);

	/**
	 * 根据 参数 分页查找 附件表
	 * @param treeId  节点id
	 * @param isManaged  是否图片空间管理
	 * @param userName 用户名
	 * @param status 状态
	 * @param pageSize 每页条数
	 * @param curPageNO 页码
	 * @return
	 */
	public PageSupport<Attachment> getAttachment(Long shopId,Long treeId, int isManaged,  int status, int pageSize, String curPageNO,String searchName, Integer imgType);

	public void updateAttachmentFileNameByFilePath(String filePath,	String fileName);

	public List<Attachment> getAttachmentByTrees(List<AttachmentTree> attmntTreeList);

	public void deleteAttachment(List<Attachment> attmntList);
	
	public Attachment getAttachmentByPath(String filePath);

	public PageSupport<Attachment> getAttachment(String shopName, int isManaged, int status, int pageSize, String curPageNO,String searchName, Integer imgType);

	public PageSupport<Attachment> getPropChildImg(Long treeId, String curPageNO, String orderBy, String searchName, Long shopId);

	public PageSupport<Attachment> getAttachmentPage(String curPageNO, String searchName, String orderBy, Long shopId,Long treeId);
}
